
<form method="POST" action="{:U('Team/profile')}">
	<h2>{$Think.lang.team_edit_tips}</h2>
    <table class="tb">
    	<tr>
            <td align="right"><label for="name">{$Think.lang.team_name}：</label></td>
            <td><eq name="_global.allow_team_rename" value="1"><input id="name" class="input" type="text" name="name" size="40" value="{$team.name}" /><else/>{$team.name}</eq></td>
            <td class="tips"></td>
        </tr>
        <tr>
            <td align="right" valign="top"><label for="category">{$Think.lang.category}：</label></td>
            <td colspan="2">
            	<eq name="_global.allow_team_recategorize" value="1">
            	<p>{$team.category_path} &nbsp;<input id="recategorize" type="checkbox" name="recategorize" value="1" onclick="categoryToggle();" /> <label for="recategorize">{$Think.lang.change_category}</label></p>
                <div id="team-category" style="display:none;">
                    <select id="first-level" onchange="getCategoryOptions(this,'second-level');">
                        <option value="0">{$Think.lang.all_categories}</option>
                        <volist name="_topCategories" id="vo">
                        <option value="{$vo.category_id}">{$vo.name}</option>
                        </volist>
                    </select>
                    <select id="second-level" style="display:none" onchange="getCategoryOptions(this,'third-level');"></select>
                    <select id="third-level" style="display:none" onchange="getCategoryOptions(this,'third-level');"></select>
                </div>
            	<else/>
                {$team.category_path}
            	</eq>
            </td>
        </tr>
        <tr>
            <td align="right"><label for="tags">{$Think.lang.team_tags}：</label></td>
            <td><input id="tags" class="input" type="text" name="tags" size="40" value="{$team.tags}" /></td>
            <td class="tips">{$Think.lang.team_tags_explain}</td>
        </tr>
        <tr>
            <td align="right" valign="top"><label for="about">{$Think.lang.team_about}：</label></td>
            <td colspan="2"><textarea id="about" class="textarea" name="about" rows="5" cols="80">{$team.about}</textarea></td>
        </tr>
        <tr>
            <td align="right"><label for="logo">{$Think.lang.team_logo}：</label></td>
            <td><input id="logo" class="input" type="file" name="logo" size="35" /></td>
            <td><img width="32" height="32" src="{$team.team_id|get_team_logo}" />{$Think.lang.team_logo_explain}</td>
        </tr>
        <tr>
            <td align="right"><label for="allow-join">{$Think.lang.team_allow_join}：</label></td>
            <td><input id="allow-join" type="radio" name="allow_join" value="1" <eq name="team.allow_join" value="1">checked</eq> /> {$Think.lang.yes} &nbsp;&nbsp;<input type="radio" name="allow_join" value="0" <eq name="team.allow_join" value="0">checked</eq> /> {$Think.lang.no}</td>
            <td class="tips"></td>
        </tr>
        <tr>
            <td align="right"><label for="new-teammate-alert">{$Think.lang.team_new_teammate_alert}：</label></td>
            <td><input id="new-teammate-alert" type="radio" name="new_teammate_alert" value="1" <eq name="team.new_teammate_alert" value="1">checked</eq> /> {$Think.lang.yes} &nbsp;&nbsp;<input type="radio" name="new_teammate_alert" value="0" <eq name="team.new_teammate_alert" value="0">checked</eq> /> {$Think.lang.no}</td>
            <td class="tips">{$Think.lang.team_new_teammate_alert_explain}</td>
        </tr>
        <eq name="captcha" value="1">
        <tr>
            <td align="right"><label for="verify">{$Think.lang.captcha}：</label></td>
            <td><input id="verify" class="input" type="text" name="verify" /></td>
            <td><div class="captcha-container"><img class="captcha" src="{:U('Ajax/captcha')}" title="{$Think.lang.captcha_again}" onclick="reCaptcha(this);" /></div></td>
        </tr>
        </eq>
        <tr>
            <td></td>
            <td>
            	<input type="submit" class="button" value="{$Think.lang.submit}" />
            	<input type="reset" class="alt-button" value="{$Think.lang.reset}" />
            	<input id="category-id" type="hidden" name="category_id" value="{$team.category_id}" />
            	<input type="hidden" name="tid" value="{$team.team_id}" />
            </td>
            <td></td>
        </tr>
    </table>
</form>

<script type="text/javascript">
function categoryToggle(){
	$('#team-category').toggle();
}
</script>